package com.grupobbva.pe.SIR.service.message;

public class WS_PersonaReniecProxy implements com.grupobbva.pe.SIR.service.message.WS_PersonaReniec_PortType {
  private boolean _useJNDI = true;
  private String _endpoint = null;
  private com.grupobbva.pe.SIR.service.message.WS_PersonaReniec_PortType __wS_PersonaReniec_PortType = null;
  
  public WS_PersonaReniecProxy() {
    _initWS_PersonaReniecProxy();
  }
  
  private void _initWS_PersonaReniecProxy() {
  
    if (_useJNDI) {
      try {
        javax.naming.InitialContext ctx = new javax.naming.InitialContext();
        __wS_PersonaReniec_PortType = ((com.grupobbva.pe.SIR.service.message.WS_PersonaReniec_Service)ctx.lookup("java:comp/env/service/WS_PersonaReniec_Service")).getWS_PersonaReniec();
      }
      catch (javax.naming.NamingException namingException) {}
      catch (javax.xml.rpc.ServiceException serviceException) {}
    }
    if (__wS_PersonaReniec_PortType == null) {
      try {
        __wS_PersonaReniec_PortType = (new com.grupobbva.pe.SIR.service.message.WS_PersonaReniec_ServiceLocator()).getWS_PersonaReniec();
        
      }
      catch (javax.xml.rpc.ServiceException serviceException) {}
    }
    if (__wS_PersonaReniec_PortType != null) {
      if (_endpoint != null)
        ((javax.xml.rpc.Stub)__wS_PersonaReniec_PortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
      else
        _endpoint = (String)((javax.xml.rpc.Stub)__wS_PersonaReniec_PortType)._getProperty("javax.xml.rpc.service.endpoint.address");
    }
    
  }
  
  
  public void useJNDI(boolean useJNDI) {
    _useJNDI = useJNDI;
    __wS_PersonaReniec_PortType = null;
    
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (__wS_PersonaReniec_PortType != null)
      ((javax.xml.rpc.Stub)__wS_PersonaReniec_PortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.grupobbva.pe.SIR.service.message.WS_PersonaReniec_PortType getWS_PersonaReniec_PortType() {
    if (__wS_PersonaReniec_PortType == null)
      _initWS_PersonaReniecProxy();
    return __wS_PersonaReniec_PortType;
  }
  
  public com.grupobbva.pe.SIR.service.message.ConsultaPorNombresResponse consultaPorNombres(com.grupobbva.pe.SIR.service.message.ConsultaPorNombresRequest consultaPorNombresRequest) throws java.rmi.RemoteException{
    if (__wS_PersonaReniec_PortType == null)
      _initWS_PersonaReniecProxy();
    return __wS_PersonaReniec_PortType.consultaPorNombres(consultaPorNombresRequest);
  }
  
  public com.grupobbva.pe.SIR.service.message.ConsultaPorDNIResponse consultaPorDNI(com.grupobbva.pe.SIR.service.message.ConsultaPorDNIRequest consultaPorDNIRequest) throws java.rmi.RemoteException{
    if (__wS_PersonaReniec_PortType == null)
      _initWS_PersonaReniecProxy();
    return __wS_PersonaReniec_PortType.consultaPorDNI(consultaPorDNIRequest);
  }
  
  
}